This disclosure relates generally to the field of computer databases. More particularly, but not by way of limitation, it relates to a technique for determining ultimate holders of a lock in real time.
Data locking is an important feature of database systems to preserve the integrity of data in the database. Typically, as a program updates a database, the blocks that are updated will be “locked” by a lock manager such that other requesting programs will not be allowed to update the block until the “lock” is released by the updating program that holds the lock.
From time to time, however, conditions occur where something happens that causes a lock not to be released in a timely manner. In systems where multiple computers share a common database, users of one computer may not be able to see that a lock is being held by a program running on another computer in the complex.
In addition, a holder of a lock may also be waiting on a lock that is held by another holder. The user may not have visibility of the actual (ultimate) holder that may be causing the problem. Managing this environment to ensure that all transactions are running optimally has been difficult.
In an online environment where transactions can reach in the thousands per second, knowing who is actually holding the lock on the database block that slows down the whole system becomes very important. In some systems, for example, a locking problem that causes a program to wait for a lock for one minute may cause restarting all or large portions of high-volume transactional systems. Operators of such systems have had difficulty in discovering information needed to solve locking problems in the often short times before such problems cause system-wide failures.